<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%--
  Created by IntelliJ IDEA.
  User: 路♥克
  Date: 2017/12/5
  Time: 2:31
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <base href="${pageContext.request.contextPath}/web/"/>
    <meta charset="UTF-8">
    <title>Document</title>
    <jsp:include page="elments_views/js.jsp"/>
    <link rel="stylesheet" type="text/css" href="frame/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="frame/bootstrap/css/button.css">
    <!-- 	<link rel="stylesheet" type="text/css" href="frame/bootstrap/css/bootstrap-theme.min.css"> -->
    <link rel="stylesheet" type="text/css" href="frame/css/layout.css">
    <link rel="stylesheet" type="text/css" href="css/style.css">
    <script type="text/javascript" src="frame/myfocus/js/myfocus-2.0.1.min.js"></script>
    <style type="text/css">
        .panel{margin-bottom: 0px;}
        .panel .panel-heading{border-radius: 0px;background: white;margin:0px;color: black;font-weight: bolder;font-size: 16px;padding-bottom: 0px;}
        .panel .panel-heading p.first-menu{border-left: 5px solid red;padding-left: 15px;}
        .panel .list-group li{border: none;padding-left: 50px;}
        .panel .list-group li a{color: black;}
        .panel .list-group li.active{background: #f9f9f9;font-weight: bold;}
        .panel .panel-heading p.date-source{font-weight:normal;color: #cfcfcf;}
    </style>
</head>
<body>
<jsp:include page="elments_views/header.jsp"/>
<div class="container" style="margin-top: 120px;">
    <div class="row">
        <jsp:include page="elments_views/about-nav.jsp"/>
        <script>
            $(function () {
                $("#yxynav li").removeClass("active");
            });
        </script>
        <div class="col-md-9">
            <div class="panel">
                <div class="panel-heading">
                    <h3>热门动态</h3>
                    <hr>
                </div>
                <div class="panel-body">
                    <c:forEach items="${appNewsListpage_hot}" var="news">
                        <div class="media" style="cursor: pointer"  onclick="window.location.href='/Web/WebGoodsInfo/getnewsInfo_detail/${news.id}'">
                            <div class="media-left">
                                <a href="#">
                                    <img class="media-object" src="/images/4.jpg" width="64" height="64" alt="...">
                                </a>
                            </div>
                            <div class="media-body">
                                <h4 class="media-heading" style="font-weight: 600">${news.title}</h4>
                                <div class="formart">${news.content}</div>
                            </div>
                        </div>
                        <hr>
                    </c:forEach>
                </div>
                <div class="text-center" style="background: white;">
                    <nav aria-label="Page navigation">
                        <ul class="pagination">
                            <li>
                                <a href="/Web/WebGoodsInfo/newsQueryinfo_hot/${pageinfo_hot.pageSize}/1" aria-label="Previous">
                                    <span aria-hidden="true">&laquo;</span>
                                </a>
                            </li>
                            <c:forEach var="page" end="${pageinfo_hot.total%pageinfo_hot.pageSize==0?pageinfo_hot.total/pageinfo_hot.pageSize:pageinfo_hot.total/pageinfo_hot.pageSize+1}" begin="1" step="1">
                                <li><a href="/Web/WebGoodsInfo/newsQueryinfo_hot/${pageinfo_hot.pageSize}/${page}">${page}</a></li>
                            </c:forEach>
                            <li>
                                <a href="/Web/WebGoodsInfo/newsQueryinfo_hot/${pageinfo_hot.pageSize}/${pageinfo_hot.total%pageinfo_hot.pageSize==0?pageinfo_hot.total/pageinfo_hot.pageSize:pageinfo_hot.total/pageinfo_hot.pageSize+1}" aria-label="Next">
                                    <span aria-hidden="true">&raquo;</span>
                                </a>
                            </li>
                        </ul>
                    </nav>
                </div>
            </div>
        </div>
    </div>
</div>
<jsp:include page="elments_views/footer.jsp"/>
<script>
    $(function(){
        var div=$(".formart");
        $.each(div,function(){
            var html=$(this).text();
            html=html.substring(0,150)+"...";
            $(this).text(html);
        });
        $("#about-nav div ul li").removeClass("active");
        $("#Hotstate").addClass("active");
    })
</script>
</body>
</html>